home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / BlitzBasic / TRITONBLITZ / Demos / memo.bb2 < prev    next >
Encoding:
Text File  |  1998-06-24  |  1.5 KB  |  62 lines

  1. ;
  2. ; Memo
  3. ; use this source as you like
  4. ; written by Philipp Lonke
  5. ;
  6. ; I let this source in the archive just to let you
  7. ; see the difference between the "old" (Memo.bb2) and the "new"
  8. ; (Memo2.bb2) TRITON programming style.
  9. ; Take also a look at the different executable sizes!
  10. ;
  11.  
  12. INCLUDE "blitz2:bbincludes/libraries/triton.bb2"
  13. NoCli
  14.  
  15. Dim para$(2)            ; storing parameters
  16. If NumPars>=2           ; in memory
  17.   For i=1 To 2
  18.     para$(i)=Par$(i)
  19.   Next
  20. Else
  21.   End                   ; exit if wrong amount of params
  22. EndIf
  23.  
  24. *application.TR_App=0   ; init variable for application
  25.  
  26. Dim apptags.TagItem(5)  ; dim application tags
  27. Dim reqtags.TagItem(10) ; dim requester tags
  28.  
  29. ; now we set the application tags for the TRITON Prefs
  30.  
  31. apptags(1)\ti_Tag=#TRCA_Name,Null("Memo")
  32. apptags(2)\ti_Tag=#TRCA_LongName,Null("Memo - the informer")
  33. apptags(3)\ti_Tag=#TRCA_Version,Null("1.0")
  34. apptags(4)\ti_Tag=#TAG_END,0
  35.  
  36. ; we don't need special requester tags. So we set them to
  37. ; zero.
  38.  
  39. reqtags(1)\ti_Tag=#TAG_DONE,0
  40.  
  41. *application=TR_CreateApp_(&apptags(1))     ; open application
  42.  
  43. If (*application)
  44.  
  45.   body$="%b"+para$(1)    ; Bold text
  46.   body$+Chr$(9)          ; Add a tab char for a 3d separator line
  47.   body$+"%3"+para$(2)    ; 3d text
  48.  
  49.   gads$="_OK"            ; the gadget text
  50.  
  51.   TR_EasyRequest_ *application,Null(body$),Null(gads$),&reqtags(1)
  52.  
  53.   *trmsg.TR_Message=TR_GetMsg_(*application)
  54.  
  55.   TR_DeleteApp_ *application      ; kill application
  56.  
  57. Else
  58.   NPrint "Unable to create application"
  59. EndIf
  60.  
  61. End
  62.